package com.xcy.quickhand.spider;

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

/**
 * @author xcy
 * @version V1.0
 * @description
 * @date 2023/2/11 17:51
 */
public class Test {

    public static void main(String[] args) {

        String cookie = "did=web_1dbcb1fddff24c74944acecb8029726d; didv=1675945966000; kpf=PC_WEB; clientid=3; userId=734799445; kuaishou.server.web_st=ChZrdWFpc2hvdS5zZXJ2ZXIud2ViLnN0EqABcFm3_q4_9Jd_rMPhGZ5T2Dc4NfZU2bMzF03wx0VbAfi1RWiFVyfFuoVz8Y0kq10_knRSwXysGIyfZ8JuxIRBNdlJDiBIFlYu1VPYUAFyHtJJ_96BvLIX6o4Pu6PqOma_hwBmVTOFKaOX8T0SijCnHxH23wMbMM8Ka46oDT2k8ht7_NMOV-gqxKotdc3VzNFiAQTpOvEJEXxTjzwE_wPjHRoSg3ZkWJHNsQvvc8vsvUksYr6BIiCFNuBRFsVwLXF7olm2taXb64CL8jYEXZ9p_phinc_qTygFMAE; kuaishou.server.web_ph=9863e984c79c33b99a58f9a260736d2384d8; kpn=KUAISHOU_VISION";

        Connection connect = Jsoup.connect("https://www.itjc8.com/thread-5432-1-1.html");
        connect.header("cookie", cookie)
                .header("content-type", "application/json")
                .header("Host", "www.kuaishou.com")
                .header("Origin", "https://www.kuaishou.com")
                .header("Referer", "https://www.kuaishou.com/profile/3xgz9zaku7hig96")
                .header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36");


        try {
            Document document = connect.get();

            System.out.println(document);

        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
